{% extends "base.html" %}
{% load news_extras %}
{% block title %}畜牧大集网{% endblock %}
{% block meta %}
<link href="{{ STATIC_URL }}css/index.css" rel="stylesheet" type="text/css" />
{% endblock %}
{% block content %}
    <div class="ad-max">
{% for item in ads.top_ad2 %}
<a href="{{ item.ad_link }}" target="_blank"><img width="960" height="80" src="{{ item.ad_file.url }}" alt="{{ item.name }}" /></a>
{% endfor %}
  </div>
	<div class="content c-1">
        <div class="c-l">
            <div class="changeBox" id="change">
		{% for item in image_headlines %}{% if item.headline_image %}
                <div class="changeDiv">
                	<div class="txtarea">
                        <!--<h3><a href="/news/view/{{ item.id }}.html" target="_blank">{{ item.title|truncatehanzi:"22" }}</a></h3>-->
                        <p><a href="/news/view/{{ item.id }}.html" target="_blank">{{ item.summary|truncatehanzi:"46" }}</a></p>
                    </div>
                    <div class="txtareabg"></div>
                    <a href="/news/view/{{ item.id }}.html" target="_blank"><img src="{{ item.headline_image.url }}" width="310" height="235" alt="" /></a>
                </div>    
		{% endif %}{% endfor %}
                <ul class="minpic">
            {% for item in image_headlines %} {% if item.headline_image %}
                    <li><a href="/news/view/{{ item.id }}.html" target="_blank"><img src="{{ item.headline_image.url }}" width="66" height="50" alt="{{ item.title }}" /></a></li>
            {% endif %} {% endfor %}
                </ul>
            </div>
        </div>
        <div class="c-m">
        {% for item in headlines %}
        {% if forloop.first %}
        <h3><a href="/news/view/{{ item.id }}.html" target="_blank">{{ item.title|truncatehanziwithoutdot:"16" }}</a></h3><ul>
        {% else %}
            {% if forloop.counter == 5 %}
            </ul><h3><a href="/news/view/{{ item.id }}.html" target="_blank">{{ item.title|truncatehanziwithoutdot:"16" }}</a></h3><ul>
            {% else %}
                {% if forloop.counter == 9 %}
                </ul><h3><a href="/news/view/{{ item.id }}.html" target="_blank">{{ item.title|truncatehanziwithoutdot:"16" }}</a></h3><ul>
                {% else %}
            	<li><a href="/news/view/{{ item.id }}.html" target="_blank">{{ item.title }}</a></li>
                {% endif %}
            {% endif %}
        {% endif %}
        {% endfor %}
        <div style="text-align:right;"><a href="/channel/2/" target="_blank">更 多</a></div>
        </div>
        <div class="c-r txt-list">
        <!--{% include 'news/search-box.html' %}-->
            <h3><span><b><a href="/channel/38/">趋 势</a></b>
            {% for aditem in ads.title_ad_qushi %}
            <a href="{{ aditem.ad_link }}" target="_blank"><img width="70" height="22" src="{{ aditem.ad_file.url }}" alt="{{ aditem.ad_text }}" /></a>
            {% endfor %}
            </span></h3>
            <ul>
            {% for item in blocks.trends %}
                <li><b><a href="/news/view/{{ item.id }}.html" target="_blank">{{ item.title|truncatehanzi:"17" }}</a></b><!--<span>{{ item.updated|date:"SHORT_DATE_FORMAT" }}</span>--></li>
            {% endfor %}
            </ul>
        </div>
    </div>
	<div class="content c-2">
        <div class="c-l">
        	<div class="changeCon" id="change1">
            <!--testing -->
            {% for subchannel in blocks.chuangye %}
                <h5><span {% if forloop.first %}class="now-c"{% endif %}><a href="###">{{ subchannel.channel.name }}</a></span></h5>
                <div class="txt-box">
                    <div class="txt-top">
                        <div class="flot-l"><a href="/news/view/{{ subchannel.headline.id }}.html" target="_blank"><img src="{{ subchannel.headline.headline_image.url }}" width="147" height="107" alt="{{ subchannel.headline.title }}" /></a></div>
                        <div class="flot-r">
                            <h4><a href="/news/view/{{ subchannel.headline.id }}.html" target="_blank">{{ subchannel.headline.title }}</a></h4>
                            <p>{{ subchannel.headline.summary|truncatehanzi:"98" }}</p>
                            <div class="more-box"><a href="/news/view/{{ subchannel.headline.id }}.html" class="more" target="_blank">详细</a></div>
                        </div>
                    </div>
                    <ul class="txt">
                    {% for item in subchannel.items %}
                        <li><b><a href="/news/view/{{ item.id }}.html" title="{{ item.title }}" target="_blank">{{ item.title|truncatehanzi:"18" }}</a></b><span>{{ item.updated|date:'SHORT_DATE_FORMAT' }}</span></li>
                    {% endfor %}
                    </ul>
                    <div class="more-box"><a href="/channel/{{ subchannel.channel.id }}/" style="display:block;margin-right:25px;margin-top:3px;" target="_blank">更 多</a></div>
                </div>
            {% endfor %}
            <!--end testing -->
                <h3 class="more">
                {% for aditem in ads.title_ad_chuangye %}
                <a href="{{ aditem.ad_link }}" target="_blank"><img width="70" height="22" src="{{ aditem.ad_file.url }}" alt="{{ aditem.ad_text }}" /></a>
                {% endfor %}
                </h3>
                <div class="box-t"></div>
            </div>
            <script>
            </script>
            <div class="box-b"><span></span></div>
        </div>
        <div class="c-r txt-list">
            <h3><span><b><a href="###">观 察</a></b>
            {% for aditem in ads.title_ad_guancha %}
            <a href="{{ aditem.ad_link }}" target="_blank"><img width="70" height="22" src="{{ aditem.ad_file.url }}" alt="{{ aditem.ad_text }}" /></a>
            {% endfor %}
            </span></h3>
            <ul>
            {% for item in blocks.observation %}
                <li><b><a href="/news/view/{{ item.id }}.html" target="_blank">{{ item.title|truncatehanzi:"16" }}</a></b><!--<span>{{ item.updated|date:"SHORT_DATE_FORMAT" }}</span>--></li>
            {% endfor %}
            </ul>
        </div>
    </div>
	<div class="content c-2">
        <div class="c-l">
        	<div class="ad">
            {% for aditem in ads.left_banner %}
            <a href="{{ aditem.ad_link }}" target="_blank"><img src="{{ aditem.ad_file.url }}" width="714" height="97" alt="{{ aditem.ad_text }}" /></a>
            {% endfor %}
            </div>
        	<div class="c-l-box">
                <div class="changeCon" id="change2">
            {% for subchannel in blocks.pinpai %}
                <h5><span {% if forloop.first %}class="now-p"{% endif %}><a href="###">{{ subchannel.channel.name }}</a></span></h5>
                <div class="txt-box">
                    <div class="txt-top">
                        <div class="flot-l"><a href="/news/view/{{ subchannel.headline.id }}.html" target="_blank"><img src="{{ subchannel.headline.headline_image.url }}" width="147" height="107" alt="{{ subchannel.headline.title }}" /></a></div>
                        <div class="flot-r">
                            <h4><a href="/news/view/{{ subchannel.headline.id }}.html" target="_blank">{{ subchannel.headline.title }}</a></h4>
                            <p>{{ subchannel.headline.summary|truncatehanzi:"98" }}</p>
                            <div class="more-box"><a href="/news/view/{{ subchannel.headline.id }}.html" class="more" target="_blank">详细</a></div>
                        </div>
                    </div>
                    <ul class="txt">
                    {% for item in subchannel.items %}
                        <li><b><a href="/news/view/{{ item.id }}.html" title="{{ item.title }}" target="_blank">{{ item.title|truncatehanzi:"18" }}</a></b><span>{{ item.updated|date:'SHORT_DATE_FORMAT' }}</span></li>
                    {% endfor %}
                    </ul>
                    <div class="more-box"><a href="/channel/{{ subchannel.channel.id }}/" style="display:block;margin-right:25px;margin-top:3px;" target="_blank">更 多</a></div>
                </div>
            {% endfor %}
                <h3 class="more">
                {% for aditem in ads.title_ad_pinpai %}
                <a href="{{ aditem.ad_link }}" target="_blank"><img width="70" height="22" src="{{ aditem.ad_file.url }}" alt="{{ aditem.ad_text }}" /></a>
                {% endfor %}
                </h3>
                    <div class="box-t"></div>
                </div>
                <div class="box-b"><span></span></div>
            </div>
        	<div class="c-l-box">
            	<div class="changeCon" id="change3">
            {% for subchannel in blocks.zhichang %}
                <h5><span {% if forloop.first %}class="now-z"{% endif %}><a href="###">{{ subchannel.channel.name }}</a></span></h5>
                <div class="txt-box">
                    <div class="txt-top">
                        <div class="flot-l"><a href="/news/view/{{ subchannel.headline.id }}.html" target="_blank"><img src="{{ subchannel.headline.headline_image.url }}" width="147" height="107" alt="{{ subchannel.headline.title }}" /></a></div>
                        <div class="flot-r">
                            <h4><a href="/news/view/{{ subchannel.headline.id }}.html" target="_blank">{{ subchannel.headline.title }}</a></h4>
                            <p>{{ subchannel.headline.summary|truncatehanzi:"98" }}</p>
                            <div class="more-box"><a href="/news/view/{{ subchannel.headline.id }}.html" class="more" target="_blank">详细</a></div>
                        </div>
                    </div>
                    <ul class="txt">
                    {% for item in subchannel.items %}
                        <li><b><a href="/news/view/{{ item.id }}.html" title="{{ item.title }}" target="_blank">{{ item.title|truncatehanzi:"18" }}</a></b><span>{{ item.updated|date:'SHORT_DATE_FORMAT' }}</span></li>
                    {% endfor %}
                    </ul>
                    <div class="more-box"><a href="/channel/{{ subchannel.channel.id }}/" style="display:block;margin-right:25px;margin-top:3px;" target="_blank">更 多</a></div>
                </div>
            {% endfor %}

                <h3 class="more">
                {% for aditem in ads.title_ad_zhichang %}
                <a href="{{ aditem.ad_link }}" target="_blank"><img width="70" height="22" src="{{ aditem.ad_file.url }}" alt="{{ aditem.ad_text }}" /></a>
                {% endfor %}
                </h3>
                    <div class="box-t"></div>
                </div>
                <div class="box-b"><span></span></div>
            </div>       
        </div>
        <div class="c-r">
        	<ul class="ad_r">
            {% for aditem in ads.right_ads %}
                <li><a href="{{ aditem.ad_link }}" target="_blank"><img src="{{ aditem.ad_file.url }}" width="235" height="93" alt="{{ aditem.ad_text }}" /></a></li>
            {% endfor %}
            </ul>
        </div>
    </div>
    <div class="ad-max">
        {% for aditem in ads.bottom_ad %}
        <a href="{{ aditem.ad_link }}" target="_blank"><img src="{{ aditem.ad_file.url }}" width="960" height="80" alt="{{ aditem.ad_text }}" /></a>
        {% endfor %}
    </div>
	<div class="content c-2">
        <div class="c-l">
        	<ul class="txt-title">
            	<li class="now now-min"><span class="now-q">企业视频</span></li>
            	<li class="more"><a href="###"><!--<img src="{{ STATIC_URL }}images/index_117.gif" alt="" />--></a></li>
            </ul>
            <div class="txt-box">
                <ul class="pic-box">
                {% for item in corp_video %}
                	<li><div class="img"><span></span><a href="/news/view/{{ item.id }}.html" title="{{ item.title }}" target="_blank"><img width="100" height="73" src="{{ item.headline_image.url }}" alt="{{ item.title }}" /></a></div><p><a href="/news/view/{{ item.id }}.html" target="_blank">{{ item.title|truncatehanziwithoutdot:"8" }}</a></p></li>
                {% endfor %}
                </ul>
                <div class="more-box"><a href="/channel/44/" class="more">详细</a></div>
        	</div> 
            <div class="box-b"><span></span></div>
        </div>
        <div class="c-r r-pt">
            <h3><span><b><a href="###">导 师</a></b><!--<img src="{{ STATIC_URL }}images/index_96.gif" alt="" />--></span></h3>
            <ul class="r-pic">
            {% for hd in mentors.headlines %}
                <li><a href="/news/view/{{ hd.id }}.html"><img width="65" height="60" src="{{ hd.headline_image.url }}" alt="{{ hd.title }}" /><div style="padding:5px 3px;text-align:center">{{ hd.title }}</div></a></li>
            {% endfor %}
            </ul>
            <!--
            <ul class="r-pic-txt">
            {% for mentor in mentors.items %}
                <li><a href="/news/view/{{ mentor.id }}.html">{{ mentor.title }}</a></li>
            {% endfor %}
            </ul>
            -->
        </div>
    </div>
    <div class="content">
        <ul class="txt-title">
            <li class="now now-min"><span class="now-h">行业图片</span></li>
            <li class="more"><a href="###"><!--<img src="{{ STATIC_URL }}images/index_117.gif" alt="" />--></a></li>
        </ul>
        <div class="txt-box">
            <ul id="ind_pics" class="pic">
            {% for item in ind_pics %}
            	<li><a href="/news/view/{{ item.id }}.html" target="_blank"><img src="{{ item.headline_image.url }}" width="145" height="106" alt="" /></a><a href="/news/view/{{ item.id }}.html" target="_blank">{{ item.title|truncatehanzi:"10" }}</a></li>
            {% endfor %}
            </ul>
            <div class="more-box"><a href="/channel/45/" class="more1">更多</a></div>
        </div> 
        <div class="box-b"><span></span></div>
    </div>
    <div class="content">
        <div class="box-t"></div>
            <div class="txt-box link">
                <span class="now-y">友情链接</span>
                {% if links %}
                {{ links.content|safe }}
                {% endif %}
            </div> 
        <div class="box-b"><span></span></div>
    </div>

{% endblock %}
{% block load_script %}
<script type="text/javascript" src="{{ STATIC_URL }}js/MSClass.js"></script>
<script type="text/javascript">
    //new Marquee("ind_pics",2,20,930,147,20,4000,3000,147);

    $(function () {
        $('#change .changeDiv').soChange({
            thumbObj:'#change .minpic li',
            autoChange:true
        });
    });
    $('#change1 .txt-box').soChange({
        thumbObj:'#change1 h5',
        slideTime:200,
        thumbOverEvent:false,
        autoChange:true, //自动切换为 false，默认为true
        overStop:true,
        changeTime:3000
    });
    $('#change2 .txt-box').soChange({
        thumbObj:'#change2 h5',
        slideTime:200,
        thumbOverEvent:false,
        autoChange:true,
        overStop:true,
        changeTime:3000
    });
    $('#change3 .txt-box').soChange({
        thumbObj:'#change3 h5',
        slideTime:200,
        thumbOverEvent:false,
        autoChange:true,
        overStop:true,
        changeTime:3000
    });
</script>
{% endblock %}

